<?php
	global $_W,$_GPC;
	if($_W['isajax']&&$_W['role']){
		$oid = $_GPC['did'];
		$bid = $_GPC['bid'];
		$v = pdo_get('mii_ang_order',array('oid'=>$oid,'book_id'=>$bid),array('oid'));
		if(empty($v)){exit(json_encode(array('status'=>'2','msg'=>'操作错误')));}
		$delorder = pdo_delete('mii_ang_order',array('oid'=>$oid));
		$delbook = pdo_delete('mii_ang_book',array('id'=>$bid));
		if($delorder||$delbook){
			$code = array('status'=>'1','msg'=>'删除成功。');
			exit(json_encode($code));
		}else{	
			$code = array('status'=>'2','msg'=>'删除失败。');
			exit(json_encode($code));			
		}
		
	}else{
		$code = json_encode(array('status'=>'2','msg'=>'没有操作权限'));
		exit($code);		
	}

?>